﻿using System.Data.Entity;
using Auth.Main;

namespace Auth.MSSQLStore
{
    public class AuthDBContext : DbContext
    {
        static AuthDBContext()
        {
            Database.SetInitializer<AuthDBContext>(null);
        }
        public AuthDBContext()
            : base("Name=AuthDB")
        { }

        public AuthDBContext(string nameOrConnectionString)
            : base(nameOrConnectionString)
        { }

        public DbSet<User> Users { get; set; }


        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new UserMap());

        }
    }
}
